<?php
/*
* ----------------------------------------------------------------------------------------------------
*  ADD STYLE AND SCRIPT
* @PACKAGE BY TONYTHEME
* ----------------------------------------------------------------------------------------------------
*/


/*
* Add scripts and styles to backend
*/
if( is_admin() ){
	add_action('admin_init', 'tt_option_load_styles');
	add_action('admin_init', 'tt_option_load_scripts');
}


/*------------------------------------------------------------------------
*Add styles to backend
------------------------------------------------------------------------*/
function tt_option_load_styles() {

		// Load Styles
		wp_enqueue_style('thickbox');
		
		wp_register_style('theme-options', API_URI.'/api_asset/css/theme_center_style_option.css', false, THEME_VERSION, 'screen');
		wp_register_style('theme-colorpicker', API_URI.'/api_asset/css/theme_center_colorpicker.css', false, THEME_VERSION, 'screen');
		wp_register_style('theme_center_uniform_default', API_URI.'/api_asset/css/theme_center_uniform.default.css', false, THEME_VERSION, 'screen');
		wp_register_style('theme-widget', API_URI.'/api_asset/css/theme-widget.css', false, THEME_VERSION, 'screen');
		wp_register_style('theme-metabox', API_URI.'/api_asset/css/theme-metabox.css', false, THEME_VERSION, 'screen');
		wp_enqueue_style('theme-options');
		wp_enqueue_style('theme_center_uniform_default');
		wp_enqueue_style('theme-colorpicker');
		wp_enqueue_style('theme-widget');
		wp_enqueue_style('theme-metabox');

}

						

/*------------------------------------------------------------------------
*Add scripts to backend
------------------------------------------------------------------------*/
function tt_option_load_scripts() {

		// Load jQuery scripts
		wp_enqueue_script('thickbox');
		wp_enqueue_script('media-upload');
		wp_enqueue_script('jquery-ui-slider');
				
		wp_register_script('jquery-upload', API_URI.'/api_asset/js/jquery-upload.js', array('jquery','media-upload','thickbox'), THEME_VERSION, false );
		wp_register_script('jquery-colorpicker', API_URI.'/api_asset/js/jquery-colorpicker.js', array('jquery'), THEME_VERSION, false );
		wp_register_script('jquery-uniform', API_URI.'/api_asset/js/jquery.uniform.js', array('jquery'), THEME_VERSION, false );
		wp_register_script('chosen-jquery', API_URI.'/api_asset/js/chosen.jquery.js', array('jquery'), THEME_VERSION, false );
		
		wp_enqueue_script('jquery-upload');
		wp_enqueue_script('chosen-jquery');
		wp_enqueue_script('jquery-uniform');
		wp_enqueue_script('jquery-colorpicker');

}

?>